package com.xiehua.task.monitor;

import com.xiehua.task.msg.TaskRegReqBody;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Serializable;

public class Statistics implements Serializable{

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private static Logger log = LoggerFactory.getLogger(Statistics.class);

    public static final String EMAIL_TYPE_COUNTING = "counting";

    public static final String EMAIL_TYPE_EXCETPION = "excetpion";

    private String type;

    private String topic;

    private Integer taskSuccess;

    private Integer taskFail;

    private Integer selfSuccess;

    private Integer selfFail;

    private Exception exception;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getTaskSuccess() {
        return taskSuccess;
    }

    public void setTaskSuccess(Integer taskSuccess) {
        this.taskSuccess = taskSuccess;
    }

    public Integer getTaskFail() {
        return taskFail;
    }

    public void setTaskFail(Integer taskFail) {
        this.taskFail = taskFail;
    }

    public Exception getException() {
        return exception;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public Integer getSelfSuccess() {
        return selfSuccess;
    }

    public void setSelfSuccess(Integer selfSuccess) {
        this.selfSuccess = selfSuccess;
    }

    public Integer getSelfFail() {
        return selfFail;
    }

    public void setSelfFail(Integer selfFail) {
        this.selfFail = selfFail;
    }

    @Override
    public String toString() {
        return "Statistics{" +
                "type='" + type + '\'' +
                ", topic='" + topic + '\'' +
                ", taskSuccess=" + taskSuccess +
                ", taskFail=" + taskFail +
                ", selfSuccess=" + selfSuccess +
                ", selfFail=" + selfFail +
                ", exception=" + exception +
                '}';
    }
}
